home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / WINWORDS / WINE02BX.ZIP / LISP / MODES / TEX-MODE.ELC < prev    next >
Text File  |  1993-03-28  |  24KB  |  344 lines

  1. ;;; compiled by @win386 on Sat Mar 13 14:33:34 1993
  2. ;;; from file c:/src/lucid-19.4/lisp/modes/tex-mode.el
  3. ;;; emacs version 19.3 Lucid.
  4. ;;; bytecomp version 2.08; 27-aug-92.
  5. ;;; optimization is on.
  6. ;;; this file uses opcodes which do not exist in Emacs18.
  7.  
  8. (if (and (boundp 'emacs-version)
  9.      (or (and (boundp 'epoch::version) epoch::version)
  10.          (string-lessp emacs-version "19")))
  11.     (error "This file was compiled for Emacs19."))
  12.  
  13. (require 'comint)
  14. (defvar tex-shell-file-name nil "\
  15. *If non-nil, is file name to use for the subshell in which TeX is run.")
  16. (defvar tex-directory "." "\
  17. *Directory in which temporary files are left.
  18. You can make this /tmp if your TEXINPUTS has no relative directories in it
  19. and you don't try to apply \\[tex-region] or \\[tex-buffer] when there are
  20. \\input commands with relative directories.")
  21. (defvar tex-offer-save t "\
  22. *If non-nil, ask about saving modified buffers before \\[tex-file] is run.")
  23. (defvar tex-run-command "tex" "\
  24. *Command used to run TeX subjob.
  25. If this string contains an asterisk (*), it will be replaced by the
  26. filename; if not, the name of the file, preceded by blank, will be added to
  27. this string.")
  28. (defvar latex-run-command "latex" "\
  29. *Command used to run LaTeX subjob.
  30. If this string contains an asterisk (*), it will be replaced by the
  31. filename; if not, the name of the file, preceded by blank, will be added to
  32. this string.")
  33. (defvar standard-latex-block-names '("abstract" "array" "center" "description" "displaymath" "document" "enumerate" "eqnarray" "eqnarray*" "equation" "figure" "figure*" "flushleft" "flushright" "itemize" "letter" "list" "minipage" "picture" "quotation" "quote" "slide" "sloppypar" "tabbing" "table" "table*" "tabular" "tabular*" "thebibliography" "theindex*" "titlepage" "trivlist" "verbatim" "verbatim*" "verse") "\
  34. Standard LaTeX block names.")
  35. (defvar latex-block-names nil "\
  36. *User defined LaTeX block names.
  37. Combined with `standard-latex-block-names' for minibuffer completion.")
  38. (defvar slitex-run-command "slitex" "\
  39. *Command used to run SliTeX subjob.
  40. If this string contains an asterisk (*), it will be replaced by the
  41. filename; if not, the name of the file, preceded by blank, will be added to
  42. this string.")
  43. (defvar tex-bibtex-command "bibtex" "\
  44. *Command used by `tex-bibtex-file' to gather bibliographic data.
  45. If this string contains an asterisk (*), it will be replaced by the
  46. filename; if not, the name of the file, preceded by blank, will be added to
  47. this string.")
  48. (defvar tex-dvi-print-command "lpr -d" "\
  49. *Command used by \\[tex-print] to print a .dvi file.
  50. If this string contains an asterisk (*), it will be replaced by the
  51. filename; if not, the name of the file, preceded by blank, will be added to
  52. this string.")
  53. (defvar tex-alt-dvi-print-command "lpr -d" "\
  54. *Command used by \\[tex-print] with a prefix arg to print a .dvi file.
  55. If this string contains an asterisk (*), it will be replaced by the
  56. filename; if not, the name of the file, preceded by blank, will be added to
  57. this string.
  58.  
  59. If two printers are not enough of a choice, you can define the value
  60. of tex-alt-dvi-print-command to be an expression that asks what you want;
  61. for example,
  62.  
  63.     (setq tex-alt-dvi-print-command
  64.          '(format \"lpr -P%s\" (read-string \"Use printer: \")))
  65.  
  66. would tell \\[tex-print] with a prefix argument to ask you which printer to
  67. use.")
  68. (defvar tex-dvi-view-command nil "\
  69. *Command used by \\[tex-view] to display a .dvi file.
  70. If this string contains an asterisk (*), it will be replaced by the
  71. filename; if not, the name of the file, preceded by blank, will be added to
  72. this string.
  73.  
  74. This can be set conditionally so that the previewer used is suitable for the
  75. window system being used.  For example,
  76.  
  77.     (setq tex-dvi-view-command
  78.           (if (eq window-system 'x) \"xdvi\" \"dvi2tty * | cat -s\"))
  79.  
  80. would tell \\[tex-view] use xdvi under X windows and to use dvi2tty
  81. otherwise.")
  82. (defvar tex-show-queue-command "lpq" "\
  83. *Command used by \\[tex-show-print-queue] to show the print queue.
  84. Should show the queue(s) that \\[tex-print] puts jobs on.")
  85. (defvar tex-default-mode 'plain-tex-mode "\
  86. *Mode to enter for a new file that might be either TeX or LaTeX.
  87. This variable is used when it can't be determined whether the file
  88. is plain TeX or LaTeX or what because the file contains no commands.
  89. Normally set to either 'plain-tex-mode or 'latex-mode.")
  90. (defvar tex-open-quote "``" "\
  91. *String inserted by typing \\[tex-insert-quote] to open a quotation.")
  92. (defvar tex-close-quote "''" "\
  93. *String inserted by typing \\[tex-insert-quote] to close a quotation.")
  94. (defvar tex-last-temp-file nil "\
  95. Latest temporary file generated by \\[tex-region] and \\[tex-buffer].
  96. Deleted when the \\[tex-region] or \\[tex-buffer] is next run, or when the
  97. tex-shell goes away.")
  98. (defvar tex-command nil "\
  99. Command to run TeX.
  100. The name of the file, preceded by a blank, will be added to this string.")
  101. (defvar tex-trailer nil "\
  102. String appended after the end of a region sent to TeX by \\[tex-region].")
  103. (defvar tex-start-of-header nil "\
  104. String used by \\[tex-region] to delimit the start of the file's header.")
  105. (defvar tex-end-of-header nil "\
  106. String used by \\[tex-region] to delimit the end of the file's header.")
  107. (defvar tex-shell-cd-command "cd" "\
  108. Command to give to shell running TeX to change directory.
  109. The value of tex-directory will be appended to this, separated by a space.")
  110. (defvar tex-zap-file nil "\
  111. Temporary file name used for text being sent as input to TeX.
  112. Should be a simple file name with no extension or directory specification.")
  113. (defvar tex-last-buffer-texed nil "\
  114. Buffer which was last TeXed.")
  115. (defvar tex-print-file nil "\
  116. File name that \\[tex-print] prints.
  117. Set by \\[tex-region], \\[tex-buffer], and \\[tex-file].")
  118. (defvar tex-mode-syntax-table nil "\
  119. Syntax table used while in TeX mode.")
  120. (fset 'tex-define-common-keys #[(keymap) "└    ┬├#ê└    ─┼#ê└    ╞╟#ê└    ╚╔#ê└    ╩╦#ç" [define-key keymap " " tex-kill-job " " tex-recenter-output-buffer "" tex-show-print-queue "" tex-print "" tex-view] 4 "\
  121. Define the keys that we want defined both in TeX mode and in the tex-shell."])
  122. (defvar tex-mode-map nil "\
  123. Keymap for TeX mode.")
  124. (byte-code "¼├┴ ┬!ê├─┼#ê├╞╟#ê├╚╔#ê├╩╦#ê├╠═#ê├╬╧#ê├╨╤#ê├╥╙#ê├╘╒#ê├╓╫#ê┴ç" [tex-mode-map make-sparse-keymap tex-define-common-keys define-key "\"" tex-insert-quote "\n" tex-terminate-paragraph "}" up-list "{" tex-insert-braces "" tex-region "" tex-buffer "" tex-file "    " tex-bibtex-file "" tex-latex-block "" tex-close-latex-block] 4)
  125. (defvar tex-shell-map nil "\
  126. Keymap for the tex-shell.  A comint-mode-map with a few additions.")
  127. (fset 'tex-mode #[nil "└ëëèebê─┼└╞#ë½Æ`è╚yê─╔╞#*ë¼e\n½ò    ¼Æ╩╦!½ï╩╠!½â═¬ä╬¬ü╧) ½ä  ¬â +ç" [nil comment slash mode search-forward "\\" t search-end 0 "%" looking-at "documentstyle" "documentstyle{slides}" slitex-mode latex-mode plain-tex-mode tex-default-mode] 4 "\
  128. Major mode for editing files of input for TeX, LaTeX, or SliTeX.
  129. Tries to determine (by looking at the beginning of the file) whether
  130. this file is for plain TeX, LaTeX, or SliTeX and calls plain-tex-mode,
  131. latex-mode, or slitex-mode, respectively.  If it cannot be determined,
  132. such as if there are no commands in the file, the value of tex-default-mode
  133. is used." nil])
  134. (byte-code "└┴Mê┬├Mç" [TeX-mode tex-mode LaTeX-mode latex-mode] 2)
  135. (fset 'plain-tex-mode #[nil "└ ê┴├╟╔\n╦ ═╬╧╨#ç" [tex-common-initialization "TeX" mode-name plain-tex-mode major-mode tex-run-command tex-command "%**start of header" tex-start-of-header "%**end of header" tex-end-of-header "\\bye\n" tex-trailer run-hooks text-mode-hook tex-mode-hook plain-tex-mode-hook] 4 "\
  136. Major mode for editing files of input for plain TeX.
  137. Makes $ and } display the characters they match.
  138. Makes \" insert `` when it seems to be the beginning of a quotation,
  139. and '' when it appears to be the end; it inserts \" only after a \\.
  140.  
  141. Use \\[tex-region] to run TeX on the current region, plus a \"header\"
  142. copied from the top of the file (containing macro definitions, etc.),
  143. running TeX under a special subshell.  \\[tex-buffer] does the whole buffer.
  144. \\[tex-file] saves the buffer and then processes the file.
  145. \\[tex-print] prints the .dvi f